<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function Person(name, age, s) {
      this.name = name;
      this.age = age;
      this.s = s;
      // arguments[name] = name
      this.eat = function () {
        console.log('我要干饭');
      }
    }
    function Person2(a, b) {
      this.a = a;
      this.b = b;
    }
    Person2.prototype.b = 2
    Person.prototype.a = 1
    Person.prototype.fn = function () {
      console.log('我是原型对象函数');
    }
    Person.prototype.obj2 = Person2.prototype
    let p = new Person('张三', 10, 12)
    console.log(p);

  </script>
</body>

</html>